//package com.csust.travel.controller;
//
//import com.csust.travel.entity.ResBean;
//import com.csust.travel.entity.User;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.CrossOrigin;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
//@RestController
//@CrossOrigin
//@RequestMapping("/user")
//public class UserController {
//
//    @Autowired
//    UserMapper userMapper;
//    @RequestMapping("/all")
//    public ResBean findAll() {
//        List<User> items = userMapper.findAllItem();
//        return new ResBean(true, null, items);
//    }
//
//
//    @RequestMapping("/one")
//    public ResBean findOne(Integer id){
//        User item  = userMapper.findById(id);
//        try {
//            return new ResBean(true,null,item);
//        } catch (Exception e) {
//            e.printStackTrace();
//            return new ResBean(false,null);
//        }
//    }
//}
